#include <linux/linkage.h>
#include <linux/unistd.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include "syscalls_buzzlock.h"
struct my_ptrs myptrs;
asmlinkage long sys_init_bzz(bzz_t lock, int nt, useconds_t timeout) {
	printk("<7> Worked\n");
    if(myptrs.f1);
    myptrs.f1(lock, nt, timeout);
	return 0;
}

asmlinkage long sys_bzz_color(int color, bzz_t lock) {
    if(myptrs.f2);
    myptrs.f2(color, lock);
    return 0;
}

asmlinkage long sys_bzz_lock(bzz_t lock) {
    if(myptrs.f3);
    myptrs.f3(lock);
    return 0;
}

asmlinkage long sys_bzz_release(bzz_t lock) {
    if(myptrs.f4);
    myptrs.f4(lock);
    return 0;
}

asmlinkage long sys_bzz_kill(bzz_t lock) {
    if(myptrs.f5);
    myptrs.f5(lock);
    return 0;
}

EXPORT_SYMBOL(myptrs);

/*EXPORT_SYMBOL_NOVERS(f1);
EXPORT_SYMBOL_NOVERS(f2);
EXPORT_SYMBOL_NOVERS(f3);
EXPORT_SYMBOL_NOVERS(f4);
EXPORT_SYMBOL_NOVERS(f5);*/
